from django.shortcuts import render
from common.models import Patientinfo,Physics

def index(request):
    umod = Patientinfo.objects
    ulist = umod.all()

    context = {"patientinfolist": ulist}
    return render(request,'myapp/AI/index.html',context)

def Data(request,hspid):
    physics = Physics.objects.filter(patient_id = hspid)
    physics_newest = physics[len(physics)-1]
    
    context = {"physics": physics_newest}
    return render(request,'myapp/AI/data.html',context)

    
    
    


    
    

